//
//  TSWebViewController.m
//  chart
//
//  Created by 曾斌 on 15/9/27.
//  Copyright (c) 2015年 xu. All rights reserved.
//

#import "TSWebViewController.h"

@interface TSWebViewController ()<UIWebViewDelegate>

@end

@implementation TSWebViewController{
    NSString *mTitle;
    NSString *mUrl;
    UIScrollView *scrollView;
}

-(id)initWithTitle:(NSString *)title andUrl:(NSString *)url
{
    if(!self){
        self = [[TSWebViewController alloc] init];
    }
    mTitle = title;
    mUrl = url;
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setTitle:mTitle];
    CGRect rect = CGRectMake(0, 0, currentDeviceWidth, currentDeviceHeight-120);
    UIWebView *webView = [[UIWebView alloc] initWithFrame:rect];
    NSURLRequest *request =[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",BASE_URL,mUrl]]];
    [webView loadRequest:request];
    webView.delegate = self;
   // [scrollView addSubview:webView];
    [self.view addSubview: webView];
}

- (void)webViewDidFinishLoad:(UIWebView *)webView
{
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}

@end
